function getQueryVariable(variable) 
{ 
	var query = window.location.search.substring(1); 
	var vars = query.split("&"); 
	for (var i=0;i<vars.length;i++) 
	{ 
		var pair = vars[i].split("="); 
		if (pair[0] == variable) 
		{ 
			return pair[1]; 
		} 
	}	 
} 


var albumId = getQueryVariable('id');


alert(albums[albumId].title);









/*
// Hold a reference to the photos within the current album iteration
	var curAlbumPhotos = albums[i].photos;
	
	// Loop each photo in the album
	for(var j=0; j<curAlbumPhotos.length; j++){
		
		// Create a li and image for each photo
		var li = document.createElement('li');
		var img = document.createElement('img');
		img.setAttribute('src',curAlbumPhotos[j].image);
		img.setAttribute('class','album-photo');
		
		// Append the image to the li and the li to the ul
		li.appendChild(img);
		ul.appendChild(li);
	}
	
	*/